home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d19
/
pcbem11u.arc
/
PCBEMII.DOC
< prev
next >
Wrap
Text File
|
1991-09-22
|
25KB
|
770 lines
PCBEM II Event Manager Version 1.0
March 19th, 1991
(C)opyright 1991 By David Chamberlain
TABLE OF CONTENTS
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
PCBEM II Version 1.0 . . . . . . . . . . . . . . . . . . . . . . . 2
Event Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Record Format . . . . . . . . . . . . . . . . . . . . . . . . . 4
Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Error Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Single PCBoard Node . . . . . . . . . . . . . . . . . . . . . . 9
Multiple PCBoard Nodes . . . . . . . . . . . . . . . . . . . . 10
PCBEM Event Manager V1.0
_________________________________ Preface _________________________________
___________________________ Naming Conventions ____________________________
The PCBEvent Manager is distributed using the filenaming convention
of: PCBEMvvx.ZIP. vv refers to the version number i.e 10 for version 1.0.
The x refers to a letter nameing of the type of code A or a for Alpha Code,
B for Beta Code, U for Unregistered and R for Registered.
_______________________________ Warranty ________________________________
The PCBEvent Manager is provided "as is" without warranty of any kind,
either expressed or implied. The only guarantee that I will make is that it
will occupy disk space and that it is running on my system. If you decide
to use PCBEvent Manager, you do so at your own risk. In no event will the
author or any distribution sites be held liable to anyone for any damages,
including but not limited to, any lost profits, lost savings, or other
incidental or consequential damages arising from your use or inability to
use PCBEvent Manager.
_______________________________ Legal Stuff _______________________________
PCBEM Event Manager is the (C)opyrighted property of David R.
Chamberlain. You are not authorized to modify, merge, reverse assemble, or
reverse compile the program, it's documentation, or the distribution ZIP
file. You may terminate this agreement by destroying all copies of PCBEM
Event Manager, it's documenation, and distribution ZIP file. David R.
Chamberlain may terminate your license if you fail to comply with the terms
and conditions of this agreement.
PCBoard is (C)opyright and Trademark of Clark Development Company, Orem
Utah.
________________________________ Shareware ________________________________
Since you have likely read statements under the heading "Shareware"
often, I need not go into the idea again. Simply be aware that PCBEM
Event Manager is shareware ($15.00 suggested), the registered version is no
different except in the title screen and the display lines. Any and all
registered users may download any update that is made to the program for as
long as they use the program. Registered users are entitled to 1 Disk with
the current PCBEM Event Manager program and 1 Update Disk when they upgrade.
All Registered Users will receive PCBEM 2.0 when released. Features
currently planned for version 2.0 are: Menu Driven Interface for defining
event times and days, Next event times, Node for each event, and a built in
editor for writing your event batch files.
To register your copy of PCBEM follow the directions in REGISTER.DOC
PCBEM Event Manager Version 1.0 ii
______________________________ INTRODUCTION _______________________________
The PCBEM Event Manager is a collection of batch files, methods and
ideas of the author. It is intended to make running a PCBoard BBS as pain
-less as is possible, especially in a multi-node environment. It provides
the means to:
1. Have multiple system events.
2. Coordinate system events between multiple nodes.
3. Schedule system maintenance without User interference.
4. Schedule system maintenance without Sysop commitment.
PCBEM Event Manager was developed for PCBoard 14.5a/E3, however, it
is believed to be comaptible with all 14.x PCBoard versions. The only
dependence on PCBoard formats is the location of the event time and node
numbers in the PCBOARD.DAT file.
PCBEM Event Manager V 1.0 1
PCBEM is a utility program which provides the ability to have
multiple events on a PCBoard bulletin board system. A table of events
is created specifying the time of each event and the day of the week
on which the event occurs. PCBEM is then placed in the EVENT.SYS
file as the first program to execute in the EVENT. PCBEM then:
1. Reads in the Event Table.
2. Locates the current event.
3. Determines the next event.
4. Updates the PCBOARD.DAT file for the next event.
5. Returns to the EVENT batch file passing an ErrorLevel indicative
of the current event.
PCBEM also waits for:
1. An event to activate.
2. An event to complete.
3. all nodes to deactivate.
4. The Sysop to acknowledge the startup of system maintenance.
The format of the PCBEM Event Manager is:
PCBEM {COMMANDLINE OPTION}
Where:
Commandline option is one of the following options:
PCBEM CHANGE d:\pcb (It is very important to leave out the \ at the end
This option must be used 1st in the EVENT.SYS file if you want to change
the time of your next event. All other options are optional and deal with
Logging the event to a log file, waiting for other nodes and waiting for
system maintenance by the SysOp.
PCBEM [ LOG(d:\path) ] [ PCBOARD(d:\path) ] [ END ]
[ EVENT(mm c) ]
[ SYSOP(mm ss c) ]
[ WAIT(mm) ]
Where:
END Signals the end of the event. The Event Active Flag
and the Node Down Counter are reset (set to 0) and
PCBEM terminates passing an Errorlevel 0.
PCBEM Event Manager V 1.0 2
EVENT(mm c) The Node Down Counter is incremented by 1, then
PCBEM loops until the NODE Down Counter equals
"c". When the Node Down Counter equals "c" the event
flag is set and PCBEM terminates passing an
Errorlevel 0 indicating the event is to start. If
the Node Down Counter does not equal "c" within "mm"
minutes the Node Down Counter is decremented by 1,
then PCBEM terminates passing an Errorlevel 16
indicating the event should be aborted. active.
LOG(d:\path) Specifies the path (drive and subdirectory) of the
PCBEVENT.LOG file. The current drive and
subdirectory is used if this parameter is not
specified. If the PCBEVENT.LOG file does not exist
it is created. PCBEM uses this file to serialize
operations between all nodes and to provide a log of
all activities. The path specified must be the same
for all nodes.
PCBOARD(d:\path) Specifies the path (drive and subdirectory) of the
PCBOARD.DAT file. The current drive and subdirectory
is used if this parameter is not specified.
SYSOP(mm ss c) The Node Down Counter is incremented by 1, then
PCBEM loops until the NODE Down Counter equals
"c". When the Node Down Counter equals "c" the event
flag is set and PCBEM issues messages asking the
Sysop whether system maintenance should begin or
PCBoard should be reactivated, then PCBEM loops
waiting for the Sysop to respond. If the Sysop
responds indicating PCBoard should be reactivated
the Event Flag and the Node Down Counter are reset
(set to 0) and PCBEM terminates passing an
Errorlevel 0. If the Sysop responds indicating
system maintenance is to begin PCBEM terminates
passing an Errorlevel 4. If the Sysop does not
respond within "ss" minutes the Event Active Flag
and Node Down Counter are reset (set to 0) and
PCBEM terminates passing an Errorlevel 16. Now
back to the beginning, if the Node Down Counter did
not equal "c" within "mm" minutes the Node Down
Counter is decremented by 1, then PCBEM
terminates passing an Errorlevel 16 indicating the
event should be aborted.
PCBEM Event Manager V 1.0 3
WAIT(mm) The Node Down Counter is incremented by 1, then
PCBEM loops until the Event Active Flag is set.
When the Event Active Flag is set PCBEM waits
until it is reset (set to 0) then terminates passing
an Errorlevel 0 indicating the event has ended. If
the Event Flag is not set within "mm" minutes the
Node Down Counter is decremented by 1, then PCBEM
terminates passing an Errorlevel 16 indicating the
event has aborted.
The following parameters may also be specified, however, they are only
intended for testing and debugging purposes. They serve no productive
purpose.
DISPLAY Displays the status of the IACA bytes.
RESET Resets both IACA bytes to x'00'.
SET(x y) Sets the 1st IACA byte to x and the 2nd IACA byte to y.
EVENT TABLE
The Event Table is contained in the PCBEVENT.DAT file. Each record in
the file represents 1 event and a maximum of 15 events may be
specified. The records are each made up of 2 fields, the 1st field
indicates the time of the event and the second field indicates the
days of the week on which the event is to occur. The records must be
kept in order by time and within time by the days of the week.
The time is specified based on a 24 hour clock 00:00 to 23:59. Leading
zeroes are required for the hours (i.e. 1:00AM is 01:00 not 1:00).
The days of the week are expressed numerically where 1=Sunday,
2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday and 7=Saturday.
PCBEM Event Manager V 1.0 4
Record Format
The Event Table may be created using any ASCII editor such as EDLIN.
The following example illustrates the contents of the PCBEVENT.DAT
file.
Time Days of Week Comments (not part of record!!)
04:00,1234567 ; Event at 04:00 Sunday through Saturday
07:15,23456 ; Event at 07:15 Monday through Friday
12:00,23456 ; Event at 12:00 Monday through Friday
In the above example PCBEM would return an ErrorLevel of 1 for the
event at 04:00, 2 for the event at 07:15, and 3 for the event at
12:00.
Two different events may be specified for the same time but on
different days. This is illustrated by the following example.
Time Days of Week Comments (not part of record!!)
04:00,17 ; Event at 04:00 Sunday and Saturday
04:00,23456 ; Event at 04:00 Monday through Friday
07:15,23456 ; Event at 07:15 Monday through Friday
12:00,23456 ; Event at 12:00 Monday through Friday
In the above example PCBEM would return an ErrorLevel of 1 for the
event at 04:00 on Sunday and Saturday, 2 for the event at 04:00 on
Monday through Friday, 3 for the event at 07:15, and 4 for the event
at 12:00.
Rules
1. Comments are not permitted.
2. The maximum number of events which may be specified are 15.
3. Each day of the week must be specified at least once.
4. The records must be kept in order by time and within time by day
of the week.
PCBEM Event Manager V 1.0 5
MESSAGES
When using the Commandline CHANGE:
The following messages may be issued by PCBEM:
PCBEM Version 1.0 Started
PCBEM Version 1.0 Ended
Unable to Determine the Day of the Week for Current Event
Unable to Locate Current Event in Event Table
Current Event is: ddddddddd at hh:mm
Unable to Locate Next Event in Event Table
Unable to Determine the Day of the Week for Next Event
Next Event is: ddddddddd at hh:mm
d:\path\PCBOARD.DAT Updated for Next Event
Invalid File Path Specified
PCBoard Data File d:\path\PCBOARD.DAT Not Found
PCBEvent Data File d:\path\PCBEVENT.DAT Not Found
PCBEvent Data File Events Exceed Maximum of 15
PCBEvent Data File Only Defines 1 Event
PCBEvent Data File Out of Order
PCBoard Data File Elements Exceed Expected Maximum
When Using the Node, Wait, SysOp Functions
PCBEM uses the first 2 bytes of the Inter-Applications
Communications Area of DOS to communicate between PCBoard nodes. The 2
bytes are located at "4F0" and "4F1" Hex in the IACA. The 1st byte is
used as a flag to indicate whether or not the event is currently
active. The 2nd byte is used as a counter to determine when all nodes
are down (not active). This technique sets up a primary/secondary
relationship between the nodes, where, the primary node performs the
event activities while the secondary node(s) wait for the event to
complete.
PCBEM Event Manager V 1.0 6
PCBEM Version 1.0 Started
PCBEM Version 1.0 Ended
Node n - Waiting for Event StartUp
Node n - Event StartUp Not Detected
Node n - Event Completion Detected
Node n - Waiting for Secondary Nodes
Node n - All Nodes Not Down, Event Aborted
Node n - Waiting for SYSOP: Ctrl+Home = Activate PCBoard
Ctrl+End = SYSOP Maintenance
Node n - Activate PCBoard Selected
Node n - Sysop Maintenance Selected
Node n - No Response From Sysop
Node n - Event Started
Node n - Event Ended
Main Event is: Active/Not Active
Node Count is: n
Invalid Parameter Specified
Insufficient Parameter(s) Specified
Invalid File Path Specified
PCBoard Data File d:\path\PCBOARD.DAT Not Found
Minutes Must Be 1 to 60
Number of Nodes Must Be 1 to 9
Unrecoverable error -- ERR
ERROR LEVELS
1-15 The index to the event table entry of the current event.
PCBEM Event Manager V 1.0 7
16 The PCBEM program has aborted due to an error. The error is
described in the messages issued by the program during
processing.
EXAMPLES
A simple example of the use of PCBEM is the situation where it is
desired to have 2 events at different times during the day, the events
will be called EVENT1.BAT and EVENT2.BAT. Assume EVENT1 is to run at
2:00 AM and EVENT2 is to run at 2:00 PM. Additionally, EVENT1 is to
run on all 7 days of the week, however, EVENT2 should only run Monday
through Friday. The PCBEVENT.DAT file would be setup as follows:
02:00,1234567
14:00,23456
Three EVENT files would then be set up as follows:
EVENT.SYS EVENT1.BAT EVENT2.BAT
echo off echo off echo off
c: c: c:
cd /pcb cd /pcb cd /pcb
pcbem change c:\pcb + + + + + + + + + +
if errorlevel 16 board + what+ + + what+ +
if errorlevel 2 event2 + +ever + + ever +
if errorlevel 1 event1 + + + + + + + + + +
board board board
Note: PCBSETUP must be used to set the initial event time to either
2:00 AM or 2:00 PM. The PCBOARD.DAT event time must match 1 of
the PCBEVENT.DAT times when PCBEM.EXE is run.
EVENT.SYS would be invoked by PCBoard at the time indicated by the
PCBOARD.DAT file. PCBEM would then match the PCBOARD.DAT time with
the entry in the PCBEVENT.DAT file to determine the current event and
the ErrorLevel would be set to the matching entries index (i.e. 1 for
02:00 and 2 for 14:00). PCBEM would then search the PCBEVENT.DAT
file for the next event time and set the time in the PCBOARD.DAT file
accordingly.
PCBEM then terminates passing the ErrorLevel set by the current
event entry. The "if errorlevel" statements then determine which event
batch file is to be executed or in the case of an error what should be
done, in the example PCBoard is re-activated.
PCBEM Event Manager V 1.0 8
Single PCBoard Node
In the single node PCBoard environment PCBEM may be used to hold
the bulletin board system idle for a period of time until the Sysop
arrives to take some action. One reason for doing this would be for
normally scheduled system maintenance.
An event is to be scheduled to hold PCBoard idle until the Sysop
indicates whether PCBoard should be reactivated or DOS should be
invoked to perform system maintenance. If the Sysop does not respond
within 30 minutes the bulletin board should be reactivated. This would
be setup as follows:
1. Using PCBSETUP set an event for the normal Sysop maintenance time
and do not allow the event time to slide.
2. Setup an EVENT.SYS file as follows:
echo off
c:
cd /pcb
pcbem log(c:\main) sysop(1 30 1)
if errorlevel 16 board
if errorlevel 4 go2dos
board
3. EVENT.SYS would be invoked by PCBoard at the time indicated by the
PCBOARD.DAT file.
4. PCBEM displays a message and allowing the Sysop to respond
indicating whether PCBoard should be reactivated or control should
be passed to DOS for system maintenance activities.
5. If the Sysop does not respond within the specified 30 minutes
PCBoard would be reactivated.
Multiple PCBoard Nodes
PCBEM may be used to coordinate PCBoard events between each node of
the bulletin board system. This can prevent file sharing problems
during the execution of the events.
Additionally, PCBEM may be used to hold multiple nodes of the
bulletin board system in an idle state for a period of time until the
Sysop arrives to take some action. One reason for doing this would be
for normally scheduled system maintenance.
PCBEM Event Manager V 1.0 9
On a 2 node PCBoard an event is to be scheduled to hold both nodes of
the bulletin board idle until the Sysop indicates whether PCBoard
should be reactivated or DOS should be invoked to perform system
maintenance. If the Sysop does not respond within 30 minutes both
nodes the bulletin board should be reactivated. This would be setup
as follows:
1. On each node using PCBSETUP set an event during which this
processing is to occur. Do not allow the event time to slide.
2. Setup an EVENT.SYS file for each node as follows:
Node #1 Node #2
EVENT.SYS EVENT.SYS
echo off echo off
c: c:
cd /pcb cd /pcb2
pcbem log(c:\main) sysop(5 30 2) pcbem log(c:\main) wait(5)
if errorlevel 16 board1 board2
if errorlevel 4 go2dos
board1
3. EVENT.SYS would be invoked by PCBoard at the time indicated by the
PCBOARD.DAT file within each node.
4. On node #1 PCBEM would wait for 5 minutes for the Node Down
Counter to reach 2, then the Event Active Flag would be set and a
message would be displayed allowing the Sysop to respond
indicating whether PCBoard should be reactivated or control should
be passed to DOS for system maintenance activities. If the Node
Down Counter did not reach 2 within 5 minutes PCBEM would
terminate passing a 16 Errorlevel.
5. On node #2 PCBEM would wait 5 minutes for the Event Active Flag
to be set, then would wait until the Event Active Flag is reset.
If the Event Active Flag is not set in the specified 5 minutes
PCBEM would terminate passing a 16 Errorlevel.
6. Back on node #1 if the Sysop indicated PCBoard should be
reactivated or did not respond within 30 minutes PCBEM would
reset the Event Active Flag and Node Down Counter then terminate
with either a 0 (reactivate) or 16 (no response) Errorlevel.
7. Back on node #2 PCBEM would terminate passing a 0 Errorlevel
after the Event Active Flag was reset by node #1.
8. If the Sysop responded indicating control should be passed to DOS
for system maintenance activities PCBEM (on node #1) would
terminate passing a 4 Errorlevel. It is then the Sysop's
responsibility to reset the Event Active Flag and the Node Down
Counter to allow node #2 to reactivate. This would be done by
issuing the following PCBEM command from the DOS prompt:
PCBEM Event Manager V 1.0 10
PCBEM LOG(C:\MAIN) PCBOARD(C:\PCB) END
The uses of PCBEM Event Manager are endless and I could go on forever
explaining the different uses. PCBEM has been tested for several months on
my system and one other and has been found to work with no problems. If you
experience a problem please report them to me and try to include your event
files and such so I may better serve you....
For a temporary time my BBS will be Off-Line but I can be contacted by
leaving me a message on Salt Air or On The Labyrinth BBS at 1-818-447-6957
PCBEM Event Manager V 1.0 11